package com.zx.cloud.controller;

import java.util.List;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.RequestLogging;
import com.zx.cloud.model.response.Response;
import com.zx.cloud.common.filter.CurrentUserId;
import com.zx.cloud.controller.client.LoanClient;
/**
 * @ClassName: BatchLendingController
 * @Description:批量放款控制器   [放款订单]-->[批量放款] 
 * @author: zhangshuai
 * @date: 2017年12月22日 下午10:15:22
 */
@RestController
@RequestMapping(value = ApiVersion.MANAGER_V1_PREFIX+"/loan", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}, consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
public class BatchLendingController {

	@Autowired
    private LoanClient loanClient;
	
	@RequestLogging
	@ApiOperation(value = "借款管理-放款订单列表-批量放款", notes = "借款管理-放款订单列表-批量放款")
	@RequestMapping(value = "/batchLending", method = RequestMethod.POST)
	@ResponseBody
	public Response batchLendingOrder(@ApiParam(hidden=true,name="登录用户ID")@CurrentUserId Long userId,@RequestBody List<String> list ){
		return	loanClient.batchLendingOrder(list);
	}
	
}
